﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SGD_ParticleEditor
{
    public partial class RandomizeWindow : Form
    {
        public event EventHandler buttonRandomizeClick;

        public RandomizeWindow()
        {
            InitializeComponent();
        }

        public bool IsNumParticlesChecked
        {
            get { return ChkBox_NumParticles.Checked; }
        }

        public bool IsLifetimeChecked
        {
            get { return ChkBox_StartLife.Checked; }
        }

        public bool IsLifetimeVariationChecked
        {
            get { return ChkBox_LifetimeVariation.Checked; }
        }

        public bool IsStartScaleChecked
        {
            get { return ChkBox_StartScale.Checked; }
        }

        public bool IsStartScaleVariationChecked
        {
            get { return ChkBox_StartScaleVariation.Checked; }
        }

        public bool IsEndScaleChecked
        {
            get { return ChkBox_EndScale.Checked; }
        }

        public bool IsEndScaleVariationChecked
        {
            get { return ChkBox_EndScaleVariation.Checked; }
        }

        public bool IsPositionChecked
        {
            get { return ChkBox_Position.Checked; }
        }

        public bool IsSourceBlendChecked
        {
            get { return ChkBox_SourceBlend.Checked; }
        }

        public bool IsDestBlendChecked
        {
            get { return ChkBox_DestinationBlend.Checked; }
        }

        public bool IsStartColorChecked
        {
            get { return ChkBox_StartColor.Checked; }
        }

        public bool IsEndColorChecked
        {
            get { return ChkBox_EndColor.Checked; }
        }

        public bool IsXVelocityChecked
        {
            get { return ChkBox_XVelocity.Checked; }
        }

        public bool IsYVelocityChecked
        {
            get { return ChkBox_YVelocity.Checked; }
        }

        public bool IsXAccelerationChecked
        {
            get { return ChkBox_XAcceleration.Checked; }
        }

        public bool IsYAccelerationChecked
        {
            get { return ChkBox_YAcceleration.Checked; }
        }

        private void Btn_CheckAll_Click(object sender, EventArgs e)
        {
            ChkBox_NumParticles.Checked = true;
            ChkBox_StartLife.Checked = true;
            ChkBox_LifetimeVariation.Checked = true;
            ChkBox_StartScale.Checked = true;
            ChkBox_StartScaleVariation.Checked = true;
            ChkBox_EndScale.Checked = true;
            ChkBox_EndScaleVariation.Checked = true;
            ChkBox_Position.Checked = true;
            ChkBox_SourceBlend.Checked = true;
            ChkBox_DestinationBlend.Checked = true;
            ChkBox_StartColor.Checked = true;
            ChkBox_EndColor.Checked = true;
            ChkBox_XVelocity.Checked = true;
            ChkBox_YVelocity.Checked = true;
            ChkBox_XAcceleration.Checked = true;
            ChkBox_YAcceleration.Checked = true;
        }

        private void Btn_ClearAll_Click(object sender, EventArgs e)
        {
            ChkBox_NumParticles.Checked = false;
            ChkBox_StartLife.Checked = false;
            ChkBox_LifetimeVariation.Checked = false;
            ChkBox_StartScale.Checked = false;
            ChkBox_StartScaleVariation.Checked = false;
            ChkBox_EndScale.Checked = false;
            ChkBox_EndScaleVariation.Checked = false;
            ChkBox_Position.Checked = false;
            ChkBox_SourceBlend.Checked = false;
            ChkBox_DestinationBlend.Checked = false;
            ChkBox_StartColor.Checked = false;
            ChkBox_EndColor.Checked = false;
            ChkBox_XVelocity.Checked = false;
            ChkBox_YVelocity.Checked = false;
            ChkBox_XAcceleration.Checked = false;
            ChkBox_YAcceleration.Checked = false;
        }

        private void Btn_Randomize_Click(object sender, EventArgs e)
        {
            if (buttonRandomizeClick != null)
            {
                buttonRandomizeClick(this, EventArgs.Empty);
            }
        }
    }
}
